package com.rightsidetech.trade.mapper;

import com.rightsidetech.trade.dtos.request.AppAfterSaleRecordReq;
import com.rightsidetech.trade.dtos.request.TdCommodityAfterServiceMoneyReq;
import com.rightsidetech.trade.dtos.request.TdCommodityAfterServiceReq;
import com.rightsidetech.trade.dtos.response.*;
import com.rightsidetech.trade.entity.TdCommodityAfterServiceRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TdCommodityAfterServiceRecordMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TdCommodityAfterServiceRecord record);

    int insertSelective(TdCommodityAfterServiceRecord record);

    TdCommodityAfterServiceRecord selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TdCommodityAfterServiceRecord record);

    int updateByPrimaryKey(TdCommodityAfterServiceRecord record);

    List<TdCommodityAfterPageResp> selectAfterServicePage(TdCommodityAfterServiceReq req);

    TdCommodityAfterServiceDetailResp selectAfterServiceDetail(@Param("id") Long id);

    TdCommodityAfterServiceRecord selectLastByOrderNo(@Param("orderNo") String orderNo);

    List<AppAfterSaleRecordResp> selectByStoreId(AppAfterSaleRecordReq req);


    List<TdCommodityAfterServiceMoneyResp> selectAfterServiceMoneyPage(TdCommodityAfterServiceMoneyReq req);

    UserAppAfterSaleRecordResp selectByUserInfoId(Long userInfoId);
}